package comprasdiretas.entity;

import java.io.Serializable;
import java.lang.String;
import javax.persistence.*;

/**
 * Entity implementation class for Entity: UsuarioEntity
 *
 */
@NamedQueries({@NamedQuery(name="procurarUsuarioPeloLogin", query="SELECT u FROM UsuarioEntity u WHERE u.login LIKE :login")})
@Entity
@Table(name="usuario", schema="comprasdiretasdb")
public class UsuarioEntity implements Serializable {

	   
	@Id
	@Column(name="login")
	private String login;
	@Column(name="senha")
	private String senha;
	@OneToOne(mappedBy="usuario",fetch=FetchType.EAGER)
	private ServidorEntity servidorEntity;
	
	private static final long serialVersionUID = 1L;

	public UsuarioEntity() {
		super();
	}
	
	public UsuarioEntity(String login,String senha) {
		this.login=login;
		this.senha=senha;
	} 
	
	public String getLogin() {
		return this.login;
	}

	public void setLogin(String login) {
		this.login = login;
	}   
	public String getSenha() {
		return this.senha;
	}

	public void setSenha(String senha) {
		this.senha = senha;
	}
	public ServidorEntity getServidorEntity() {
		return servidorEntity;
	}
	public void setServidorEntity(ServidorEntity servidorEntity) {
		this.servidorEntity = servidorEntity;
	}
	
	
   
}
